#ifndef NETCLIENT_H_
#define NETCLIENT_H_
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/socket.h>
#include <resolv.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <iostream>
using namespace std;
class NetClient {
public:
	NetClient();
	virtual ~NetClient();
	void RevHello(char* str,int para[]);
	void SendHi();
	void CreateConnect();
	void CheckConnect();
	void MyTest();
protected:
	void ConnectServer();
	bool CheckBuff(char* str,int num);
	void HandlePacket();
	void DividePacket(char* str);
	void HandlePacketHead(char** str,int param[]);
	void SendPacket(string strInfo);
private:
#define MAXBUF 1024
	int sockfd;
	struct sockaddr_in serverAddr;
	bool connectFlag;
};
#endif /* NETCLIENT_H_ */